﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../../include/admincontent.jsp" %>
<div id="location">当前位置：首页 > 招聘实施 > 社会招聘 > 简历筛选</div>
<div id="Content">
<%--    <div class="btnbar">
        <button type="button" class="save" id="resume_ok">通过筛选</button>
        <button type="button" class="del" id="resume_no">未通过筛选</button>
        <button type="button" class="list" id="dosz_tjgw" pid="${pid}" fid="${fid}" deptcode="${deptcode}">推荐其他岗位
        </button>
        <button type="button" class="card" id="publishresult" fid="${fid}" deptcode="${deptcode}">公布/屏蔽结果</button>
        <button type="button" class="list" id="resume_next">进入下一步</button>
        <button type="button" class="save" id="resumeCheck_ok">批量通过筛选</button>
        <button type="button" class="del" id="resumeCheck_no">批量未通过筛选</button>
        <button type="button" class="del" id="repetition_clear">重复简历筛选</button>
        <button type="button" class="del" id="resume_show">流程查询</button>
        <button type="button" class="save" id="resume_output">导出</button>
        <button type="button" class="back" onclick="javascript:history.go(-1);">返回</button>
    </div>--%>
    <div class="toolbars" style="height:30px;white-space:nowrap;width:auto;margin-left: 10px;" totalwidth="314">
        <a id="resume_ok" >
            <em class="ico16 password_protection_16"></em>
            <span class="menu_span" title="通过筛选">通过筛选</span>
        </a>
        <a id="resume_no" style="margin-left: 5px">
            <em  class="ico16 no_through_ico_16"></em>
            <span  class="menu_span" title="未通过筛选">未通过筛选</span>
        </a>
        <a id="dosz_tjgw" style="margin-left: 5px" fid="${fid}" deptcode="${deptcode}">
            <em class="ico16 recommend_16"></em>
            <span class="menu_span" title="推荐其他岗位">推荐其他岗位</span>
        </a>
        <a id="gxpublishresult" style="margin-left: 5px" fid="${fid}" deptcode="${deptcode}">
            <em class="ico16 grid_listview"></em>
            <span class="menu_span" title="公布/屏蔽结果">公布/屏蔽结果</span>
        </a>
        <a id="resume_next" style="margin-left: 5px">
            <em  class="ico16 more_blue"></em>
            <span  class="menu_span" title="进入下一步" >进入下一步</span>
        </a>
        <a id="resumeCheck_ok" style="margin-left: 5px">
            <em  class="ico16 part_set_up_16"></em>
            <span  class="menu_span" title="批量通过筛选">批量通过筛选</span>
        </a>
        <a id="resumeCheck_no" style="margin-left: 5px">
            <em  class="ico16 password_protection_16"></em>
            <span  class="menu_span" title="批量未通过">批量未通过筛选</span>
        </a>
        <a id="repetition_clear" style="margin-left: 5px">
            <em  class="ico16 repeat_launched_16"></em>
            <span  class="menu_span" title="重复简历筛选">重复简历筛选</span>
        </a>
        <a id="resume_show" style="margin-left: 5px">
            <em  class="ico16 list_show_16"></em>
            <span  class="menu_span" title="流程查询">流程查询</span>
        </a>
        <a id="resume_output" style="margin-left: 5px">
            <em  class="ico16 behavioranalysis_down"></em>
            <span  class="menu_span" title="导出">导出</span>
        </a>
        <a style="margin-left: 5px" onclick="javascript:history.go(-1);">
            <em  class="ico16 back_16"></em>
            <span  class="menu_span" title="返回">返回</span>
        </a>

    </div>

    <div id="searchbox">
        <form id="sform">
            <input type="hidden" name="proid" value="${pid}"/>
            <input type="hidden" name="path" value="/${fid}/"/>
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td>姓名:</td>
                    <td colspan="2">
                        <div><input type="text" name="name"/></div>
                    </td>

                    <td>身份证号:</td>
                    <td colspan="3">
                        <div><input type="text" name="cardno"/></div>
                    </td>
                    <td>简历状态:</td>
                    <td colspan="3">
                        <div>
                            <select name="state">
                                <option value="">不限</option>
                                <option value="未处理">未处理</option>
                                <option value="已通过">已通过</option>
                                <option value="未通过">未通过</option>
                            </select>
                        </div>
                    </td>
                    <td>性别:</td>
                    <td colspan="3">
                        <div>
                            <select name="sex">
                                <option value="">不限</option>
                                <option value="男">男</option>
                                <option value="女">女</option>
                            </select>
                        </div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>招聘职位:</td>
                    <td colspan="2">
                        <div>
                            <div><select name="jname">
                                <option value="">不限</option>
                                ${jobs}</select></div>
                            </div>
                    </td>
                    <td>毕业院校:</td>
                    <td colspan="3">
                        <div><input type="text" name="university"/></div>
                    </td>
                    <td>所学专业:</td>
                    <td colspan="3">
                        <div><input type="text" name="majorname"/></div>
                    </td>
                    <td>最高学历:</td>
                    <td colspan="3">
                        <div><select name="education">
                            <option value="-1">不限</option>
                            ${education}</select></div>
                    </td>
                    <td></td>
                </tr>
                <tr class="moretj">
                    <td>民族:</td>
                    <td colspan="2">
                        <div><select name="mzcode">
                            <option value="">不限</option>
                            ${minzu}</select></div>
                    </td>
                    <td>政治面貌:</td>
                    <td colspan="3">
                        <div><select name="zzmmcode">
                            <option value="">不限</option>
                            ${zzmm}</select></div>
                    </td>
                    <td>婚否:</td>
                    <td colspan="3">
                        <div><select name="mcode">
                            <option value="">不限</option>
                            ${hunfou}</select></div>
                    </td>
                    <td>职业资格证:</td>
                    <td>
                        <div><select name="qllevelpid" id="s_jndjp">
                            <option value="">不限</option>
                            ${jndj}</select></div>
                    </td>
                    <td>
                        <div><select name="qllevelcode" id="s_jndj">
                            <option value="">不限</option>
                        </select></div>
                    </td>
                    <td>
                        <div><select name="qllevelscode" id="s_jndjs">
                            <option value="">不限</option>
                        </select></div>
                    </td>
                    <td></td>
                </tr>
                <tr class="moretj">
                    <td width="80">专业技术职务:</td>
                    <td width="80">
                        <div><select name="posttype" id="s_postt">
                            <option value="">不限</option>
                            ${posttype}</select></div>
                    </td>
                    <td width="80">
                        <div><select name="postlevel" id="s_postl">
                            <option value="">不限</option>
                        </select></div>
                    </td>
                    <td width="70" style="text-align:right;">年龄:</td>
                    <td width="60">
                        <div><input type="text" name="agefrom"/></div>
                    </td>
                    <td width="16" style="text-align:center;">至</td>
                    <td width="60">
                        <div><input type="text" name="ageto"/></div>
                    </td>
                    <td width="60" style="text-align:right;">工作年限:</td>
                    <td width="50">
                        <div><input type="text" name="workyearfrom"/></div>
                    </td>
                    <td width="36" style="text-align:center;">至</td>
                    <td width="50">
                        <div><input type="text" name="workyearto"/></div>
                    </td>
                    <td width="70" style="text-align:right;">身高:</td>
                    <td width="55">
                        <div><input type="text" name="heightfrom"/></div>
                    </td>
                    <td width="105" style="text-align:center;">至</td>
                    <td width="80">
                        <div><input type="text" name="heightto"/></div>
                    </td>
                    <td></td>
                </tr>
                <tr class="moretj">
                    <td>简历编号:</td>
                    <td colspan="2">
                        <div><input type="text" name="code"/></div>
                    </td>
                    <td>户口所在地:</td>
                    <td colspan="3">
                        <div><input type="text" name="hukouaddress"/></div>
                    </td>
                    <td>现居住地:</td>
                    <td colspan="3">
                        <div><input type="text" name="nowaddress"/></div>
                    </td>
                    <td>是否放弃:</td>
                    <td colspan="3">
                        <div>
                            <select name="fqstate">
                                <option value="">全部</option>
                                <option value="未放弃" selected>未放弃</option>
                                <option value="已放弃">已放弃</option>
                            </select>
                        </div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="15">
                        <button id="searchbtn" type="button" class="search"></button>
                    </td>
                    <td>
                        <button id="showhidebtn" type="button" class="moretjbtn0" onclick="moreparam()"
                                title="高级查询"></button>
                    </td>
                </tr>
                </thead>
            </table>
        </form>
    </div>
    <table class="treeTable" id="tablelist">
        <thead>
        <tr>
            <td width="20"><input type="checkbox" class="allcheckbox" title="选择全部/取消全选"/></td>
            <td width="30">行号</td>
            <td width="80">简历编号</td>
            <td width="120">招聘职位</td>
            <td width="60">姓名</td>
            <td width="30">性别</td>
            <td width="30">年龄</td>
            <td width="50">工作经验</td>
            <td width="120">专业</td>
            <td width="70">学历</td>
            <td width="80">联系方式</td>
            <td width="50">简历状态</td>
            <td>备注</td>
            <td width="50">公布结果</td>
            <td width="50"></td>
        </tr>
        </thead>
        <tbody id="result"></tbody>
    </table>
    <div id="page"></div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#conditionbtn').click(function () {
            $('.condition_cont').slideToggle(300);
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        });

        getList();
        $('#searchbtn').click(function () {
            getList();
        });

        $('#resume_ok').click(function () {
            var url = '/Do/SZResume/ResumeOkAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}';
            DelInfo(url);
        });
        $('#resume_no').click(function () {
            var id = '';
            var count = 0;
            $('#tablelist tbody input[type=checkbox]').each(function () {
                if ($(this).is(":checked")) {
                    count++;
                    id = $(this).attr('id').replace('cb_', '');
                }
            });
            if (count < 1) {
                $.Showmsg('请选择一条信息');
            } else if (count > 1) {
                $.Showmsg('只能选择一条信息');
            } else {
                openLayer('简历筛选未通过', '/Do/SZResume/bz?id=' + id + '&pid=${pid}&fid=${fid}&deptcode=${deptcode}', '500px', '200px');
            }
        });

        $('#resume_next').click(function () {
            layer.confirm('只有通过简历筛选的人员才能执行此操作。<br>确定要执行吗？', {
                btn: ['是', '否']
            }, function () {
                DelInfo('/Do/SZResume/NextAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}');
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

        $('#resume_show').click(function () {

                $.ajax({
                url:'/Do/SZ/getflows?pid=${pid}&fid=${fid}&deptcode=${deptcode}',
                dataType:'html',
                success:function (html) {
                    var mdiv='<div id="Content"><div class="help"><b>提示：</b>灰色表示流程未开始；橙色表示流程正在进行；绿色表示流程已结束。</div><div id="result" class="doflow">'+html+'</div></div>';
                    layer.open({
                        type: 1,
                        title: '流程查询',
                        shade: 0.5,
                        skin:'doflow',
                        area: ['800px', '500px'],
                        content:mdiv
                    });
                }

            });
        });
    });

    function getList() {
        $("#page").myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '/Do/SZResume/getresumes?flowid=${fid}',
                param: $("#sform").serialize(),
                dataType: 'html',
                callback: function (data) {
                    var rows= createRowNo(data);
                    $('#result').html(rows);
                }
            }
        });
    }


    function createRowNo(obj,currPage){
        var rowsObj=$(obj);
        if(rowsObj.length>=3){
            var pageCount=$(rowsObj[rowsObj.length-2]).val();
            var allCount=$(rowsObj[rowsObj.length-1]).val();
            var td="";
            for (var i=0;i<rowsObj.length-2;i++){
                if(rowsObj.length-2<=pageCount){
                    if(currPage){
                        if(currPage<=1){
                            td=$("<td>"+(i+1)+"</td>");
                        }else{
                            td=$("<td>"+(currPage*pageCount)+(i+1)+"</td>")
                        }
                    }else{
                        td=$("<td>"+(i+1)+"</td>");
                    }
                }
                var tr=rowsObj[i];
                var fc=tr.cells[0];
                $(fc).after(td);
                $(tr.cells).each(function (index,cell) {
                    var title=$(cell).attr("title");
                    if(!title){
                        $(cell).attr("title",$(cell).html());
                    }
                })
            }

            return rowsObj;
        }
    }
</script>
</body>
</html>